#ifndef GD_MODEL_QUERY_MAKER_H
#define GD_MODEL_QUERY_MAKER_H

#include "../documents/models/graphicdatamodel.h"

#include <QtCore/QUuid>

namespace core
{
class IGraphicEditorItem;

class GDModelQueryMaker
{
public:
    GDModelQueryMaker(const GraphicDataModel& model);
    ~GDModelQueryMaker();

    QList<int> getTypes() const;

    IGraphicEditorItem* getItem(const QUuid& id) const;
    QList<IGraphicEditorItem* > getItems() const;
    QList<IGraphicEditorItem* > getItems(const QString& name) const;
    QList<IGraphicEditorItem* > getItems(int type,
        const QString& name = QString()) const;

    QList<const ConnectionData* > getConnections(
        const QUuid& id) const;
    QList<const ConnectionData* > getIncomingConnections(
        const QUuid& id) const;
    QList<const ConnectionData* > getOutgoingConnections(
        const QUuid& id) const;

    bool canFindPath(IGraphicEditorItem* startPoint,
        IGraphicEditorItem* endPoint) const;

private:
    const GraphicDataModel& m_model;
};

} // namespace core

#endif
